package com.josework.springhelloworld.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Author: Joseph Xu
 * @Date: 2021/7/10 10:55
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//@JsonPropertyOrder(value = {"name","id"})
public class Article implements Serializable{
//    @JsonIgnore
    private Long id;
    private String author;
    private String title;
    private String content;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT")
    private LocalDateTime addTime;

//    private List<Reader> readers;


}
